package com.team.controller;

import com.team.entity.News;
import com.team.service.NewsSpecialService;
import com.team.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author keluoyisi
 * @program: seven
 * @description: 新闻专项
 * @date 2022-10-17 16:50:37
 */
@Controller
@ResponseBody
@RequestMapping("/NewsSpecialController")
public class NewsSpecialController {
    @Autowired
    private NewsSpecialService newsSpecialService;

    /**
     * @param :
     * @return Result
     * @description  获取到所有的kind
     */
    @RequestMapping("/kindAll")
    public Result kindAll(){
        return newsSpecialService.kindAll();
    }

    /**
     * @param :
     * @return Result
     * @description 获得所有的状态
     */
    @RequestMapping("/statusAll")
    public Result statusAll(){
        return newsSpecialService.statusAll();
    }
     /**
      * @param news:
      * @return Result
      * @description 添加新闻
      */
    @RequestMapping("/addnews")
    public Result addnews(@RequestBody News news){
        return newsSpecialService.addnews(news);
    }

}
